//
//  XYNetWorkParser.h
//  XYFMApp
//
//  Created by 岁变 on 16/8/29.
//  Copyright © 2016年 岁变. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^successBlock)(id result);
typedef void(^failureBlock)(NSError *error);

typedef NS_ENUM(NSUInteger, XYResponseStyle) {
    XYJSON,
    XYDATA,
    XYXML,
};

typedef NS_ENUM(NSUInteger, XYRequestStyle) {
    XYBodyString,
    XYBodyJSON,
};

@interface XYNetWorkParser : NSObject

+(void)POST:(NSString *)url
    andBody:(id)body
andBodyStyle:(XYRequestStyle)bodyStyle
  andHeader:(NSDictionary *)headers
andResponse:(XYResponseStyle)responseStyle
andSuccessBlock:(successBlock)success
andFailureBlock:(failureBlock)failure;

@end
